import React from 'react';
import { axconst } from '@/shared/axconst';
import { AxTable } from '@/components/AxList';
import { AxCreateGridTwoForm } from '@/components/AxForm/AxCreateForm';
import { AxLabel } from '@/components/AxForm/AxFormItem';

const Record: React.FC<any> = props => {

    /** 配置列 */
    const columns = [
        {
            title: '使用人',
            dataIndex: 'user',
            width: axconst.width.threeonly,
        },
        {
            title: '使用量',
            dataIndex: 'used',
            width: axconst.width.threeonly,
        },
        {
            title: '出库时间',
            dataIndex: 'outTime',
            width: axconst.width.time,
        },
        {
            title: '备注',
            dataIndex: 'remark',
            width: axconst.width.remark,
        },
    ];

    return (
        <AxCreateGridTwoForm
            title='使用记录'
            {...props}
            items={[
                <AxLabel
                    label='物资名称'
                    value='浓硫酸'
                />,
                <AxLabel
                    label='物资编码'
                    value='bx1012101010'
                />,
                <AxLabel
                    label='使用量'
                    value='202ml'
                />,
                <AxTable
                    wholerow='two'
                    size='default'
                    bordered={false}
                    // checkboxModel={false}
                    // addemptycolumn={true}
                    columns={columns}
                    data={axconst.useRecord}
                />,
            ]}
        />
    );
};

export default Record;
